package org.example.Single;

public class Singleton03 {
    private Singleton03(){};

    private volatile static Singleton03 singleton03;   //volatile防止指令重拍

    public  Singleton03 getSingleton03(){
        if(singleton03==null){
            synchronized (Singleton03.class){
                if(singleton03==null){
                    singleton03 = new Singleton03();
                }
            }
        }
        return singleton03;
    }
}
